output = open("week 2-2.txt", "w", encoding="utf-8")
content = """

# Create
a = 1
b = 2
print(a + b)

a = "hello"
a += " world"
print(a)

# Retrieve
a = "hello world"
print(a.find("l"))

a = "hello world"
print(a.index("e"))

# Startswith 和 Endswith
a = "morning!.jpg"
print(a.startswith("m"))
print(a.endswith(".jpg"))

# UPDATE
a = "mornrng!.jpg"
print(a.replace("rng","ing"))

a = "   morning!   "
print(a.split())

a = "good","morning"
print(" ".join(a))

#Delete
a = "   morning!   "
print(a.strip())
print(a.lstrip())
print(a.rstrip())

"""
output.write(content)
output.close()